
10000:Register then unregister a new device
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(TestDeviceID)


10010:Register and add an attribute then verify
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceID)
TestDeviceStoreGetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreFreeDevice()


10020:Register and add an attribute then verify that there are a total of 2 attribtutes
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceID)
TestDeviceStoreGetDeviceAttrCount(2)
TestDeviceStoreFreeDevice()


10030:Register and add an attribute then verify using attribute index
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceID)
TestDeviceStoreGetDeviceAttrByIndex(1,Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreFreeDevice()


10040:Register and verify the device ID
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreGetDeviceID(TestDeviceID)
TestDeviceStoreFreeDevice()


10050:Register 3 devices and enumerate them
TestDeviceStoreRegisterDevice(TestDeviceID1)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567 #1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreRegisterDevice(TestDeviceID2)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567 #2)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreRegisterDevice(TestDeviceID3)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567 #3)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetFirstDevice()
TestDeviceStoreGetDeviceID(TestDeviceID1)
TestDeviceStoreFreeDevice()
TestDeviceStoreGetNextDevice()
TestDeviceStoreGetDeviceID(TestDeviceID2)
TestDeviceStoreFreeDevice()
TestDeviceStoreGetNextDevice()
TestDeviceStoreGetDeviceID(TestDeviceID3)
TestDeviceStoreFreeDevice()

10080:Try registering a device that had already been registered before
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreRegisterDevice(TestDeviceID)=-2147171348


10090:Set multiple attributes, commit, and verify
TestDeviceStoreRegisterDevice(TestDeviceID)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceID)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(Some New Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreGetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(Some New Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(Some Other New Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(Some New Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceID)
TestDeviceStoreGetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(Some New Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(Some Other New Attribute Name,Some value of the attribute 1234567)

10100:Set multiple attributes, set some shorter and longer, commit, and verify
TestDeviceStoreRegisterDevice(TestDeviceIDNew)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(Another Attribute,Another value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(New Attribute Name,New value of the attribute 1234567)
TestDeviceStoreSetDeviceAttr(BLAH Attribute Name,BLAH value of the attribute)
TestDeviceStoreGetDeviceAttr(Some Attribute Name,Some value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(Another Attribute,Another value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(New Attribute Name,New value of the attribute 1234567)
TestDeviceStoreGetDeviceAttr(BLAH Attribute Name,BLAH value of the attribute)
TestDeviceStoreSetDeviceAttr(Another Attribute,Shorter value)
TestDeviceStoreSetDeviceAttr(New Attribute Name,New MUCH LONGER value of the attribute 12345678)
TestDeviceStoreGetDeviceAttr(Another Attribute,Shorter value)
TestDeviceStoreGetDeviceAttr(New Attribute Name,New MUCH LONGER value of the attribute 12345678)
TestDeviceStoreSetDeviceAttr(Some Attribute Name,A bit different)
TestDeviceStoreSetDeviceAttr(BLAH Attribute Name,Again this one is a bit different and longer not shorter)
TestDeviceStoreGetDeviceAttr(Some Attribute Name,A bit different)
TestDeviceStoreGetDeviceAttr(BLAH Attribute Name,Again this one is a bit different and longer not shorter)
TestDeviceStoreCommitDevice()
TestDeviceStoreGetDeviceAttr(Some Attribute Name,A bit different)
TestDeviceStoreGetDeviceAttr(Another Attribute,Shorter value)
TestDeviceStoreGetDeviceAttr(New Attribute Name,New MUCH LONGER value of the attribute 12345678)
TestDeviceStoreGetDeviceAttr(BLAH Attribute Name,Again this one is a bit different and longer not shorter)
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(TestDeviceIDNew)
TestDeviceStoreGetDeviceAttr(Some Attribute Name,A bit different)
TestDeviceStoreGetDeviceAttr(Another Attribute,Shorter value)
TestDeviceStoreGetDeviceAttr(New Attribute Name,New MUCH LONGER value of the attribute 12345678)
TestDeviceStoreGetDeviceAttr(BLAH Attribute Name,Again this one is a bit different and longer not shorter)
TestDeviceStoreFreeDevice()

10110: Register a NULL device
TestDeviceStoreRegisterDevice(NULL)=-2147024809(0x80070057 E_INVALIDARG)

10120: Unregister a NULL device
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(NULL)=-2147024809(0x80070057 E_INVALIDARG)

10130: Unregister a registered device 2 times
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(Test Device 1)
TestDeviceStoreUnRegisterDevice(Test Device 1)=-2147172316(0x8004C024, DRM_E_HDSSLOTNOTFOUND)

10140: Unregister an invalid device handle
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(XTestXDeviceX1X)=-2147172316(0x8004C024, DRM_E_HDSSLOTNOTFOUND)

'10150: Commit a device without registration
'10160: Commit a NULL device

10170: Register a device, set attributes, and commit: then get the device, change the attributes, free the device handle and attempt to commit.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreSetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Test Device 1)
'verify attributes are set
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreSetDeviceAttr(Device Attribute 12457, New Attribute Description 168493)
TestDeviceStoreSetDeviceAttr(12345 Next Attribute, 09876 New Attribute Value)
TestDeviceStoreFreeDevice(FALSE, TRUE)
TestDeviceStoreCommitDevice()=-2147024809(0x80070057 E_INVALIDARG) 'device is freed so we are committing NULL
TestDeviceStoreGetDeviceByID(Test Device 1)
'verify atttributes are unchanged from original committed values
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreUnRegisterDevice(Test Device 1)

10180: Register a device and set attributes; get the device and change attributes but do not commit the changes.  Get the device again and the attributes should be unchanged.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreSetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Test Device 1)
'verify attributes are set
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreSetDeviceAttr(Device Attribute 12457, New Attribute Description 168493)
TestDeviceStoreSetDeviceAttr(12345 Next Attribute, 09876 New Attribute Value)
TestDeviceStoreFreeDevice(FALSE, TRUE)
TestDeviceStoreGetDeviceByID(Test Device 1)
'verify atttributes are unchanged from original committed values
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreUnRegisterDevice(Test Device 1)

10190: Register a device and set attributes; do not commit the changes and free the device handle.  Get the device again and the attributes should not be present
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Device Attribute 12457, Attribute Description 168493)
TestDeviceStoreSetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)
TestDeviceStoreFreeDevice(FALSE, TRUE)
TestDeviceStoreGetDeviceByID(Test Device 1)
'verify attributes are set
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)=-2147024637(0X80070103 DRM_E_NOMORE)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)=-2147024637(0X80070103 DRM_E_NOMORE)
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(Test Device 1)

'10200: Call DRM_DVS_GetDeviceID for a NULL device ID
'10210: Call DRM_DVS_GetDeviceByID for NULL device ID
'10220: Call DRM_DVS_GetDeviceID with an unregistered device ID
'10230: Call DRM_DVS_GetDeviceByID with an unregistered device ID
'10240: Call DRM_DVS_FreeDevice for a NULL device handle
'10250: Call DRM_DVS_FreeDevice for an invalid device handle
'10260: Call DRM_DVS_GetFirstDevice with a NULL store context and valid handle
'10270: Call DRM_DVS_GetFirstDevice with a NULL device handle and valid context
'10280: Call DRM_DVS_GetFirstDevice with NULL parameters
'10290: Call DRM_DVS_GetNextDevice with a NULL store context and valid handle
'10300: Call DRM_DVS_GetNextDevice with a NULL device handle and valid context
'10310: Call DRM_DVS_GetNextDevice with NULL parameters
'10320: Call DRM_DVS_GetDeviceByID with a NULL store context and other parameters valid.
'10330: Call DRM_DVS_GetDeviceByID with a NULL store context and other parameters valid.
'10340: Call DRM_DVS_GetDeviceByID with a NULL device handle and other parameters valid.
'10350: Call DRM_DVS_GetDeviceByID with NULL parameters.
'10360: Call DRM_DVS_GetDeviceID with a NULL store context and other parameters valid.
'10370: Call DRM_DVS_GetDeviceID with a NULL device handle and other parameters valid.
'10380: Call DRM_DVS_GetDeviceID with NULL parameters.
'10390: Get a device attribute for a NULL device
'10400: Get a device attribute for an invalid device ID

10410: Unregister a device and attempt to get an attribute for it
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreUnRegisterDevice(Widget Industries D100)
TestDeviceStoreGetDeviceByID(Widget Industries D100)=-2147171347(0x8004C3ED, DRM_E_DEVICE_NOT_REGISTERED)
TestDeviceStoreGetDeviceAttr(Device Attribute 12457, Attribute Description 168493)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreGetDeviceAttr(12345 Next Attribute, 09876 Next Attribute Value)=-2147024809(0x80070057 E_INVALIDARG)

'10420: Call DRM_DVS_GetDeviceAttr with a NULL store context.
'10430: Call DRM_DVS_GetDeviceAttr with a NULL output buffer
'10440: Call DRM_DVS_GetDeviceAttr with NULL parameters

10450: Get the attribute count for an invalid device ID
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Widget Industries QX5000)=-2147171347(0x8004C3ED, DRM_E_DEVICE_NOT_REGISTERED)
TestDeviceStoreGetDeviceAttrCount(1)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreUnRegisterDevice(Widget Industries D100)

10460: Get the attribute count for a NULL device
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(NULL)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreGetDeviceAttrCount(1)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreUnRegisterDevice(Widget Industries D100)

'10470: Call DRM_DVS_GetDeviceAttrCount with a NULL attribute count 
'10480: Call DRM_DVS_GetDeviceAttrCount with NULL parameters

10490: Free a device handle twice.
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreFreeDevice()

10500: Get a device attribute for a valid device ID and invalid attribute index
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreSetDeviceAttr($%#^!@ Attribute 34, 156Value !!*&)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Widget Industries D100)
TestDeviceStoreGetDeviceAttrCount(2)
TestDeviceStoreGetDeviceAttrByIndex(128, $%#^!@ Attribute 34, 156Value !!*&)=-2147024637(0X80070103 DRM_E_NOMORE)
TestDeviceStoreUnRegisterDevice(Widget Industries D100)

10510: Get a device attribute for a valid device ID and NULL attribute index
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreSetDeviceAttr($%#^!@ Attribute 34, 156Value !!*&)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Widget Industries D100)
TestDeviceStoreGetDeviceAttrCount(2)
TestDeviceStoreGetDeviceAttrByIndex(NULL, $%#^!@ Attribute 34, 156Value !!*&)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreUnRegisterDevice(Widget Industries D100)

10520: Get a device attribute for an invalid device ID and attribute index
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreSetDeviceAttr($%#^!@ Attribute 34, 156Value !!*&)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Widget Industries QX600)=-2147171347(0x8004C3ED, DRM_E_DEVICE_NOT_REGISTERED)
TestDeviceStoreGetDeviceAttrByIndex(999999, $%#^!@ Attribute 34, 156Value !!*&)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreUnRegisterDevice(Widget Industries D100)

'10530: Call DRM_DVS_GetDeviceAttrByIndex with a NULL attribute name ptr
'10540: Call DRM_DVS_GetDeviceAttrByIndex with a NULL attribute name count ptr
'10550: Call DRM_DVS_GetDeviceAttrByIndex with a NULL attribute value ptr
'10560: Call DRM_DVS_GetDeviceAttrByIndex with a NULL attribute value count ptr
'10570: Call DRM_DVS_GetDeviceAttrByIndex with all NULL parameters

10580: Set an attribute to a valid device with a NULL attribute name
TestDeviceStoreRegisterDevice(Barsoft Foonator)
TestDeviceStoreSetDeviceAttr(NULL, 156Value !!*&)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Barsoft Foonator)
TestDeviceStoreGetDeviceAttrByIndex(1, NULL, 156Value !!*&)=-2147024637(0x80070103 DRM_E_NOMORE)
TestDeviceStoreUnRegisterDevice(Barsoft Foonator)

10590: Set an attribute to a valid device with a NULL attribute value
TestDeviceStoreRegisterDevice(Barsoft Foonator)
TestDeviceStoreSetDeviceAttr($%#^!@ Attribute 34, NULL)=-2147024809(0x80070057 E_INVALIDARG)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Barsoft Foonator)
TestDeviceStoreGetDeviceAttrByIndex(1, $%#^!@ Attribute 34, NULL)=-2147024637(0x80070103 DRM_E_NOMORE)
TestDeviceStoreUnRegisterDevice(Barsoft Foonator)

'10600: Set an attribute to a NULL device with valid attribute data
'10610: Set an attribute to an invalid device ID with valid attribute data
'10620: Call DRM_DVS_SetDeviceAttr will all NULL parameters

10630: Set an attribute with 1000 character attribute name
TestDeviceStoreRegisterDevice(Barsoft Foonator)
TestDeviceStoreSetDeviceAttr(If we are mark'd to die  we are enow To do our country loss; and if to live  The fewer men  the greater share of honour. God's will! I pray thee  wish not one man more. By Jove  I am not covetous for gold  Nor care I who doth feed upon my cost; It yearns me not if men my garments wear; Such outward things dwell not in my desires. But if it be a sin to covet honour  I am the most offending soul alive. No  faith  my coz  wish not a man from England. God's peace! I would not lose so great an honour As one man more methinks would share from me For the best hope I have. O  do not wish one more! Rather proclaim it  Westmoreland  through my host  That he which hath no stomach to this fight  Let him depart; his passport shall be made  And crowns for convoy put into his purse; We would not die in that man's company That fears his fellowship to die with us. This day is call'd the feast of Crispian. He that outlives this day  and comes safe home  Will stand a tip-toe when this day is nam'd  And r, St. Crispin)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Barsoft Foonator)
TestDeviceStoreGetDeviceAttr(If we are mark'd to die  we are enow To do our country loss; and if to live  The fewer men  the greater share of honour. God's will! I pray thee  wish not one man more. By Jove  I am not covetous for gold  Nor care I who doth feed upon my cost; It yearns me not if men my garments wear; Such outward things dwell not in my desires. But if it be a sin to covet honour  I am the most offending soul alive. No  faith  my coz  wish not a man from England. God's peace! I would not lose so great an honour As one man more methinks would share from me For the best hope I have. O  do not wish one more! Rather proclaim it  Westmoreland  through my host  That he which hath no stomach to this fight  Let him depart; his passport shall be made  And crowns for convoy put into his purse; We would not die in that man's company That fears his fellowship to die with us. This day is call'd the feast of Crispian. He that outlives this day  and comes safe home  Will stand a tip-toe when this day is nam'd  And r, St. Crispin)
TestDeviceStoreUnRegisterDevice(Barsoft Foonator)

10640: Set an attribute with 1000 character attribute value
TestDeviceStoreRegisterDevice(Barsoft Foonator)
TestDeviceStoreSetDeviceAttr(Hamlet, To be  or not to be--that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles And by opposing end them. To die  to sleep-- No more--and by a sleep to say we end The heartache  and the thousand natural shocks That flesh is heir to. 'Tis a consummation Devoutly to be wished. To die  to sleep-- To sleep--perchance to dream: ay  there's the rub  For in that sleep of death what dreams may come When we have shuffled off this mortal coil  Must give us pause. There's the respect That makes calamity of so long life. For who would bear the whips and scorns of time  Th' oppressor's wrong  the proud man's  contumely The pangs of despised love  the law's delay  The insolence of office  and the spurns That patient merit of th' unworthy takes  When he himself might his quietus make With a bare bodkin? Who would fardels bear  To grunt and sweat under a weary life  But that the dread of something after death  T)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Barsoft Foonator)
TestDeviceStoreGetDeviceAttr(Hamlet, To be  or not to be--that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles And by opposing end them. To die  to sleep-- No more--and by a sleep to say we end The heartache  and the thousand natural shocks That flesh is heir to. 'Tis a consummation Devoutly to be wished. To die  to sleep-- To sleep--perchance to dream: ay  there's the rub  For in that sleep of death what dreams may come When we have shuffled off this mortal coil  Must give us pause. There's the respect That makes calamity of so long life. For who would bear the whips and scorns of time  Th' oppressor's wrong  the proud man's  contumely The pangs of despised love  the law's delay  The insolence of office  and the spurns That patient merit of th' unworthy takes  When he himself might his quietus make With a bare bodkin? Who would fardels bear  To grunt and sweat under a weary life  But that the dread of something after death  T)
TestDeviceStoreUnRegisterDevice(Barsoft Foonator)

'10650: Register a device and set an attribute.  Then register a second device and try to get the attribute set to device 1 using device 2s device handle.
'10660: Register two devices: set an attribute for device 2, then set an attribute for device 1 and verify the attributes.

'For the following tests, TestDeviceStoreRegisterManyDevices enumerates all devices and attributes after registration is done.
10670: Register 10 devices, enumerate them, and unregister them
TestDeviceStoreRegisterManyDevices(TestBulkDevice, 10)
TestDeviceStoreUnRegisterManyDevices(TestBulkDevice, 10)

10680: Register 100 devices, enumerate them, and unregister them
TestDeviceStoreRegisterManyDevices(TestBulkDeviceWithAMuchLongerName, 100)
TestDeviceStoreUnRegisterManyDevices(TestBulkDeviceWithAMuchLongerName, 100)

10690: Register 1000 devices, enumerate them, and unregister them
TestDeviceStoreRegisterManyDevices(^&!*#$--Test--TestBulkDeviceWithGarbage, 1000)
TestDeviceStoreUnRegisterManyDevices(^&!*#$--Test--TestBulkDeviceWithGarbage, 1000)

10700: Register a device and set 10 attributes, then enumerate the attributes
TestDeviceStoreRegisterDevice(Way Cool Portable Media Center)
TestDeviceStoreSetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, 10, Way Cool Attribute Value)
TestDeviceStoreGetDeviceByID(Way Cool Portable Media Center)
TestDeviceStoreGetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, Way Cool Attribute Value)
TestDeviceStoreUnRegisterDevice(Way Cool Portable Media Center)

10710: Register a device and set 100 attributes, then enumerate the attributes
TestDeviceStoreRegisterDevice(Way Cool Portable Media Center)
TestDeviceStoreSetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, 100, Way Cool Attribute Value)
TestDeviceStoreGetDeviceByID(Way Cool Portable Media Center)
TestDeviceStoreGetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, Way Cool Attribute Value)
TestDeviceStoreUnRegisterDevice(Way Cool Portable Media Center)

10720: Register a device and set 1000 attributes, then enumerate the attributes
TestDeviceStoreRegisterDevice(Way Cool Portable Media Center)
TestDeviceStoreSetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, 1000, Way Cool Attribute Value)
TestDeviceStoreGetDeviceByID(Way Cool Portable Media Center)
TestDeviceStoreGetManyAttr(Way Cool Portable Media Center, Way Cool Attribute Name, Way Cool Attribute Value)
TestDeviceStoreUnRegisterDevice(Way Cool Portable Media Center)

10730: Register 10 devices with 10 attributes each, enumerate each device and its attributes, then unregister them
TestDeviceStoreRegisterManyDevices(TestBulkDevice, 10, TestBulkDeviceAttibuteName, 10, TestBulkDeviceAttributeValue)
TestDeviceStoreUnRegisterManyDevices(TestBulkDevice, 10)

10740: Register 100 devices with 10 attributes each, enumerate each device and its attributes, then unregister them
TestDeviceStoreRegisterManyDevices(TestBulkDeviceWithAMuchLongerName, 100, TestBulkDeviceWithAMuchLongerNameAttributeName, 10, TestBulkDeviceWithAMuchLongerNameAttributeValue)
TestDeviceStoreUnRegisterManyDevices(TestBulkDeviceWithAMuchLongerName, 100)

10750: Register 1000 devices with 10 attributes each, enumerate each device and its attributes, then unregister them
TestDeviceStoreRegisterManyDevices(^&!*#$--Test--TestBulkDeviceWithGarbage, 1000, ^&!*#$--Test--TestBulkDeviceWithGarbageAttributeName, 10, ^&!*#$--Test--TestBulkDeviceWithGarbageAttributeValue)
TestDeviceStoreUnRegisterManyDevices(^&!*#$--Test--TestBulkDeviceWithGarbage, 1000)

10760: Register one device.  Move the device store time forward 48 hours.  Verify the device is still registered in the store.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreChangeTime(172800)
TestDeviceStoreGetDeviceByID(Test Device 1)

10770: Register one device.  Move the device store time forward 24 hours.  Register a second device.  Move the device store time forward 24 hours. Verify both devices are still present.  Move the device store time forward 24 hours.  Verify both devices are present.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreChangeTime(86400)

TestDeviceStoreRegisterDevice(Test Device 2)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreChangeTime(86400)

TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreGetDeviceByID(Test Device 2)
TestDeviceStoreChangeTime(86400)

TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreFreeDevice()
TestDeviceStoreGetDeviceByID(Test Device 2)

10780: Register a device.  Move the device store time backward 48 hours.  Verify device is still in store.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreChangeTime(-172800)
TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreGetDeviceAttrCount(1)

10790: Register a device and set attributes.  Move the device store time forward 48 hours.  Verify the device is valid and verify attributes.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreSetDeviceAttr(Attribute 2, Value 2)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
TestDeviceStoreChangeTime(172800)
TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreGetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreGetDeviceAttr(Attribute 2, Value 2)

'10800: Call DRM_DVS_Initialize twice with the same data.
'10810: Call DRM_DVS_Uninitialize twice using the same parameters each time.
'10820: Call DRM_DVS_Uninitialize, then DRM_DVS_Initialize with the same paramteres each time.
'10830: Call DRM_DVS_Initialize with NULL parameters.
'10840: Call DRM_DVS_Uninitialize with NULL parameters.
'10850: Register three devices.  Attempt to enumerate four devices.

10860: Commit a device handle twice.
TestDeviceStoreRegisterDevice(Widget Industries D100)
TestDeviceStoreCommitDevice()
TestDeviceStoreCommitDevice()

10870: Register a device: set several attributes.  Modify a few and leave the rest unmodified.  Commit the changes and verify the attributes.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreSetDeviceAttr(Attribute 2, Value 2)
TestDeviceStoreSetDeviceAttr(Attribute 3, Value 3)
TestDeviceStoreSetDeviceAttr(Attribute 4, Value 4)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
'get device and verify existing attributes
TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreGetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreGetDeviceAttr(Attribute 2, Value 2)
TestDeviceStoreGetDeviceAttr(Attribute 3, Value 3)
TestDeviceStoreGetDeviceAttr(Attribute 4, Value 4)
'Change some attributes
TestDeviceStoreSetDeviceAttr(Attribute 3, Value 5)
TestDeviceStoreSetDeviceAttr(Attribute 4, Value 6)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()
'Verify changes
TestDeviceStoreGetDeviceByID(Test Device 1)
TestDeviceStoreGetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreGetDeviceAttr(Attribute 2, Value 2)
TestDeviceStoreGetDeviceAttr(Attribute 3, Value 5)
TestDeviceStoreGetDeviceAttr(Attribute 4, Value 6)

10880: Register a device, set attributes, and unregister the device.
TestDeviceStoreRegisterDevice(Test Device 1)
TestDeviceStoreSetDeviceAttr(Attribute 1, Value 1)
TestDeviceStoreSetDeviceAttr(Attribute 2, Value 2)
TestDeviceStoreSetDeviceAttr(Attribute 3, Value 3)
TestDeviceStoreSetDeviceAttr(Attribute 4, Value 4)
TestDeviceStoreCommitDevice()
TestDeviceStoreFreeDevice()